<%--
 *  File:    ThroughDayMonitReport.jsp
 *  @Author: gengan
 *  Date:    2011/11/14
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<% //--------------------------------------  setting logger --%>
<%
  	Category cat = Category.getInstance("jsp.ThroughDayMonitReport"); 

  //init param
  String strModuleName = "CM";
  String privilegeCode = "R60040";
  String contextPath = request.getContextPath();
%>
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>ThroughDayMonitReport</title>
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>
<%@ include file="/rpt/ReportURL.inc" %>
<%@ include file="/inc/NewCalendar.inc" %>

<script>

 function page_go(){
	var orgname = cform.orgname.value;
	var orgcode = cform.orgcode.value;
	
	var salstatus = cform.salstatus.value;
	if(salstatus != ' '){
	if(salstatus == 1) {
	salstatus = 'Y';}else{
	salstatus = 'N'}
	}

	var purstatus = cform.purstatus.value;
	if(purstatus != ' '){
	if(purstatus == 1) {
	purstatus = 'Y';}else{
	purstatus = 'N'}
	}
	
	var invstatus = cform.invstatus.value;
	if(invstatus != ' '){
	if(invstatus == 1) {
	invstatus = 'Y';}else{
	invstatus = 'N'}
	}
	
 	var createdate = cform.createdate.value;
	
	if(createdate == null || createdate =="")createdate= new Date().toFormatString("yyyy-mm-dd");
	var url =  "<%= reportURL%>" + "/frameset?__report=/ovalreport/ThroughDayMonitReport.rptdesign&sessionid=<%=session.getId()%>&createdate="+escape(encodeURI(createdate));
	if(!isEmpty(orgname)) url += "&orgname=" +escape(encodeURI(orgname));
	if(!isEmpty(orgcode)) url += "&orgcode=" +escape(encodeURI(orgcode));
	if(!isEmpty(salstatus)) url += "&salstatus=" +escape(encodeURI(salstatus));
	if(!isEmpty(purstatus)) url += "&purstatus=" +escape(encodeURI(purstatus));
	if(!isEmpty(invstatus)) url += "&invstatus=" +escape(encodeURI(invstatus));
	document.iframe.location.href = url;

	
 }
 window.onload=function(){
		cform.createdate.value=new Date().toFormatString("yyyy-mm-dd");
	 }
</script>
</head>
<body >
<iframe id="reloadHandler" name="reloadHandler" style="display:none"></iframe>
<% //--------------------------------------  page location --%>
	<%@ include file="/inc/PageLocation.inc" %>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
<form name="cform" method="post" action="<%=contextPath %>/Dispatcher"  target="_self">
	<input type="hidden" name="actionname">

   <tr>
    <td> 
      <table width="100%" border="0" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center" 
style="background:url(<%= contextPath %>/images/<%= strLanguageCode %>/title_2_bg.jpg) repeat-x; " height="36">  
         <tr onkeydown="if(event.keyCode==13) page_go();">
         <td width="8%" class="td_right"><%= label.getLabelName("L_DealerName") + label.getLabelName("L_Colon") %></td>
         <td width="10%" class="td_center"><custom:text property="orgname" readonly="false" size="36"/></td>
         <td width="8%" class="td_right"><%= label.getLabelName("L_DealerCode") + label.getLabelName("L_Colon") %></td>
         <td width="10%" class="td_center"><custom:text property="orgcode" readonly="false" size="16"/></td>
         <td width="8%" class="td_right"><%= label.getLabelName("L_CreateDate") + label.getLabelName("L_Colon") %></td>
         <td width="14%" class="td_center"> 
              	<custom:text property="createdate" dataType="date" readonly="true" dataFormat="dataformat" />
              	&nbsp;<a onclick="javascript:c.show(this,'cform.createdate','<%=JspHelper.filterNull( session.getAttribute("dateformat") )%>');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
         </td>
         	<td width="6%" class="td_right"><%= label.getLabelName("L_SalesStatus") + label.getLabelName("L_Colon") %></td>
			<td width="5%"><custom:selectdic dictType="YesOrNo" property="salstatus" defaultValue="------" defaultValueCost = " " /></td>
			
			<td width="6%" class="td_right"><%= label.getLabelName("L_BusinessStatus") + label.getLabelName("L_Colon") %></td>
			<td width="5%"><custom:selectdic dictType="YesOrNo" property="purstatus" defaultValue="------" defaultValueCost = " " /></td>
			
			<td width="6%" class="td_right"><%= label.getLabelName("L_InventoryStatus") + label.getLabelName("L_Colon") %></td>
			<td width="5%"><custom:selectdic dictType="YesOrNo" property="invstatus" defaultValue="------" defaultValueCost = " " /></td>
			
         	<td><a href="javascript:page_go()"><img src="<%= contextPath %>/images/<%= strLanguageCode %>/go_fy.gif" border="0" style="border: 1 solid #000000"></a></td>
         <td width="*%" class="td_right">&nbsp;</td>
         </tr>
       </table>
    </td>
  </tr>
  </form>
</table>
<iframe src="<%= contextPath %>/Blank.jsp" frameborder=0 width="100%" height="85%" name="iframe"></iframe>
</body>
</html>